package com.qyhl.shop.shop.shop;

import com.qyhl.webtv.commonlib.entity.shop.ShopDetailBean;

public class ShopDetailPresenter implements ShopDetailContract.ShopDetailPresenter {
    private ShopDetailContract.ShopDetailView mView;
    private ShopDetailModel mModel;

    public ShopDetailPresenter(ShopDetailContract.ShopDetailView mView) {
        this.mView = mView;
        this.mModel = new ShopDetailModel(this);
    }

    @Override
    public void getDetail(int shopId, String phoneNum) {
        mModel.getDetail(shopId, phoneNum);
    }

    @Override
    public void getCoupon(String phoneNum, int couponId, String sign) {
        mModel.getCoupon(phoneNum, couponId, sign);
    }

    @Override
    public void followShop(String phoneNum, int shopId, String sign) {
        mModel.followShop(phoneNum, shopId, sign);
    }

    @Override
    public void unFollowShop(String phoneNum, int shopId, String sign) {
        mModel.unFollowShop(phoneNum, shopId, sign);
    }

    @Override
    public void setDetail(ShopDetailBean bean) {
        mView.setDetail(bean);
    }

    @Override
    public void setError(String msg) {
        mView.setError(msg);
    }

    @Override
    public void getCouponResult(String msg) {
        mView.getCouponResult(msg);
    }

    @Override
    public void followResult(String msg,boolean isFollow) {
        mView.followResult(msg,isFollow);
    }
}
